#include <iostream>
using namespace std;
#include <iomanip>
using std::setw;
#include <cmath>
#include <cstring>

int* find_sum(int a[],int len,int target)
{
	int* b = new int[2];
	for(int i=0;i<len-1;i++)
	{
		for(int j=i+1;j<len;j++)
		{
			if(a[i]+a[j]==target)
			{
				b[0]=i;
				b[1]=j;
				return b;
				exit(0);
			}
		}
	}
	cout << "not find";
	exit(0);
}

int main()
{
	int a[10]={10,1,2,3,4,5,6,7,8,9};
	int len=sizeof(a)/sizeof(a[0]);
	int target,*c;
	cin >> target;
	cout << "\n";
	c=find_sum(a,len,target);
	for(int i=0;i<2;i++) cout << *(c+i) <<" ";
	return 0;
}
